//#Author:bin
// -*- charset = utf-8 -*-
// @time:2022/8/25 9:31
// @Author:bfl91
// @file : getfun.js
// @Software:WebStorm
import myAxios from "@/api/http";
//获取轮播图
export function getBanar() {
    return myAxios({
        url:'/home/swiperdata',
        method:'get',
    })
}
//导航菜单
export function getCatitems() {
    return myAxios({
        url:'/home/catitems',
        method:'get',
    })
}
//楼层
export function getFloorData() {
    return myAxios({
        url:'/home/floordata',
        method:'get',
    })
}

//商品分类 /categories
export function getCategories() {
    return myAxios({
        url:'/categories',
        method:'get',
    })
}

//商品列表搜索
export function getSearch() {
    return myAxios({
        url:'/goods/search',
        method:'get',
        params:{}
    })
}

//商品详情
export function getDetail(id=Number) {
    return myAxios({
        url:'/goods/detail',
        method:'get',
        params:{goods_id:id},
    })
}

//商品搜索
export function getqSearch() {
    return myAxios({
        url:'/goods/qsearch',
        method:'get',
    })
}

export default {
    getSearch,getDetail,getqSearch,
    getBanar,getCatitems,getCategories,getFloorData
}